package com.hotel.main.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.hotel.main.entity.enums.EmploymentType;
import com.hotel.main.entity.enums.MaritalStatus;
import com.hotel.main.entity.enums.PayPeriodTypes;
import com.hotel.main.entity.enums.TimeEntry;

@Entity
@Table(name="employees")
@SequenceGenerator(name="employees_gen", allocationSize=1, sequenceName="employee_seq")
public class Employee extends AbstractPerson {
	private static final long serialVersionUID = -662016846808846761L;

	@Id 
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="employees_gen")
	private Long id;
	
	@Column(name = "employment_type")
	@Enumerated(EnumType.STRING)
	private EmploymentType employmentType;
	
	@Column(name = "occupation")
	private String occupation;
	
	@Column(name = "sin_number")
	private String sinNumber;
	
	@Column(name = "time_entry")
	@Enumerated(EnumType.STRING)
	private TimeEntry timeEntry;
	
	@Column(name = "pay_period_types")
	@Enumerated(EnumType.STRING)
	private PayPeriodTypes payPeriodTypes;
	
	@Column(name = "employment_start_date")
	@Temporal(TemporalType.DATE)
	private Date employmentStartDate;
	
	@Column(name = "employment_end_date")
	private Date employmentEndDate;

	@Column(name = "marital_status")
	@Enumerated(EnumType.STRING)
	private MaritalStatus maritalStatus;
	
	@Column(name = "children")
	private Integer children;
	
	@Column(name = "graduation_year")
	@Temporal(TemporalType.DATE)
	private Date graduationYear;
	
	@Column(name = "university", length=60)
	private String university;
	
	@Column(name = "faculcy", length=60)
	private String faculcy;
		
	@Override
	public Long getId() {
		return id;
	}

    @Override
	public void setId(Long id) {
		this.id = id;
	}
	
	public void setEmploymentType(EmploymentType employmentType) {
		this.employmentType = employmentType;
	}

	public EmploymentType getEmploymentType() {
		return employmentType;
	}

	public void setOccupation(String occupation) {
		this.occupation = occupation;
	}

	public String getOccupation() {
		return occupation;
	}

	public void setSinNumber(String sinNumber) {
		this.sinNumber = sinNumber;
	}

	public String getSinNumber() {
		return sinNumber;
	}

	public void setTimeEntry(TimeEntry timeEntry) {
		this.timeEntry = timeEntry;
	}

	public TimeEntry getTimeEntry() {
		return timeEntry;
	}

	public void setPayPeriodTypes(PayPeriodTypes payPeriodTypes) {
		this.payPeriodTypes = payPeriodTypes;
	}

	public PayPeriodTypes getPayPeriodTypes() {
		return payPeriodTypes;
	}

	public void setEmploymentStartDate(Date employmentStartDate) {
		this.employmentStartDate = employmentStartDate;
	}

	public Date getEmploymentStartDate() {
		return employmentStartDate;
	}

	public void setEmploymentEndDate(Date employmentEndDate) {
		this.employmentEndDate = employmentEndDate;
	}

	public Date getEmploymentEndDate() {
		return employmentEndDate;
	}
	
	public void setMaritalStatus(MaritalStatus maritalStatus)
	{
		this.maritalStatus = maritalStatus;
	}
	
	public MaritalStatus getMaritalStatus()
	{
		return maritalStatus;
	}
	
	public void setChildren(Integer children) {
		this.children = children;
	}

	public Integer getChildren() {
		return children;
	}
	
	public void setGraduationYear(Date graduationYear)
	{
		this.graduationYear = graduationYear;
	}
	
	public Date getGraduationYear()
	{
		return graduationYear;
	}
	
	public void setUnivercity(String university)
	{
		this.university = university;
	}
	
	public String getUniversity()
	{
		return university;
	}
	
	public void setFaculcy(String faculcy)
	{
		this.faculcy = faculcy;
	}
	
	public String getFaculcy()
	{
		return faculcy;
	}
}
